package com.ajnp.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class ConfigClientController {

    //获取端口号
    @Value("${server.port}")
    public String serverPort;

    //读取gitee中的 config.info文件
    @Value("${config.info}")
    public String configInto;

    @GetMapping("/configinto")
    public String configinto() {
        return "serverPort:  " + serverPort + "  configPort:" + configInto;
    }


}
